import { deepCopy } from '../../assets/utils/util'

const state = {
  arr: [],
  carList: [],
  arr1: []
}

// const defaultValue = deepCopy(state)

const getters = {
}
const mutations = {
  async CAR_ADD (state, obj) {
    state.arr.push(obj)
  },
  CAR_REMOVE (state, val) {
    let index = state.arr.findIndex(ele => {
      ele.name = val
    })
    state.arr.splice(index, 1)
  },
  CAR_CLEAR (state) {
    state.arr = []
  }
}
const actions = {

}

export default {
  state,
  getters,
  mutations,
  actions
}